﻿#include "FITKNasSectionInfoPBAR.h"

namespace Interface
{
    FITKNasAbstractSectionInfo::NasSectionType FITKNasSectionInfoPBAR::getNasSectionType()
    {
        return FITKNasAbstractSectionInfo::NasSectionPBAR;
    }

    void FITKNasSectionInfoPBAR::setArea(const double & value)
    {
        _area.setValue(value);
    }


    double FITKNasSectionInfoPBAR::getArea() const
    {
        return _area.getValue();
    }

    void FITKNasSectionInfoPBAR::setInertiaAreaMomentsI1(const double & value)
    {
        _inertiaAreaMomentsI1.setValue(value);
    }

    double FITKNasSectionInfoPBAR::getInertiaAreaMomentsI1() const
    {
        return _inertiaAreaMomentsI1.getValue();
    }

    void FITKNasSectionInfoPBAR::setInertiaAreaMomentsI2(const double & value)
    {
        _inertiaAreaMomentsI2.setValue(value);
    }

    double FITKNasSectionInfoPBAR::getInertiaAreaMomentsI2() const
    {
        return _inertiaAreaMomentsI2.getValue();
    }

    void FITKNasSectionInfoPBAR::setInertiaAreaMomentsI12(const double & value)
    {
        _inertiaAreaMomentsI12.setValue(value);
    }

    double FITKNasSectionInfoPBAR::getInertiaAreaMomentsI12() const
    {
        return _inertiaAreaMomentsI12.getValue();
    }

    void FITKNasSectionInfoPBAR::setTorsionalConstant(const double & value)
    {
        _torsionalConstant.setValue(value);
    }

    double FITKNasSectionInfoPBAR::getTorsionalConstant() const
    {
        return _torsionalConstant.getValue();
    }

    void FITKNasSectionInfoPBAR::setNonstructuralMass(const double & value)
    {
        _nonstructuralMass.setValue(value);
    }

    double FITKNasSectionInfoPBAR::getNonstructuralMass() const
    {
        return _nonstructuralMass.getValue();
    }

    void FITKNasSectionInfoPBAR::setStressRecoveryCoeffC1(const double & value)
    {
        _stressRecoveryCoeff[0].setValue(value);
    }

    double FITKNasSectionInfoPBAR::getStressRecoveryCoeffC1() const
    {
        return _stressRecoveryCoeff[0].getValue();
    }

    void FITKNasSectionInfoPBAR::setStressRecoveryCoeffC2(const double & value)
    {
        _stressRecoveryCoeff[1].setValue(value);
    }

    double FITKNasSectionInfoPBAR::getStressRecoveryCoeffC2() const
    {
        return _stressRecoveryCoeff[1].getValue();
    }

    void FITKNasSectionInfoPBAR::setStressRecoveryCoeffD1(const double & value)
    {
        _stressRecoveryCoeff[2].setValue(value);
    }

    double FITKNasSectionInfoPBAR::getStressRecoveryCoeffD1() const
    {
        return _stressRecoveryCoeff[2].getValue();
    }

    void FITKNasSectionInfoPBAR::setStressRecoveryCoeffD2(const double & value)
    {
        _stressRecoveryCoeff[3].setValue(value);
    }

    double FITKNasSectionInfoPBAR::getStressRecoveryCoeffD2() const
    {
        return _stressRecoveryCoeff[3].getValue();
    }

    void FITKNasSectionInfoPBAR::setStressRecoveryCoeffE1(const double & value)
    {
        _stressRecoveryCoeff[4].setValue(value);
    }

    double FITKNasSectionInfoPBAR::getStressRecoveryCoeffE1() const
    {
        return _stressRecoveryCoeff[4].getValue();
    }

    void FITKNasSectionInfoPBAR::setStressRecoveryCoeffE2(const double & value)
    {
        _stressRecoveryCoeff[5].setValue(value);
    }

    double FITKNasSectionInfoPBAR::getStressRecoveryCoeffE2() const
    {
        return _stressRecoveryCoeff[5].getValue();
    }

    void FITKNasSectionInfoPBAR::setStressRecoveryCoeffF1(const double & value)
    {
        _stressRecoveryCoeff[6].setValue(value);
    }

    double FITKNasSectionInfoPBAR::getStressRecoveryCoeffF1() const
    {
        return _stressRecoveryCoeff[6].getValue();
    }

    void FITKNasSectionInfoPBAR::setStressRecoveryCoeffF2(const double & value)
    {
        _stressRecoveryCoeff[7].setValue(value);
    }

    double FITKNasSectionInfoPBAR::getStressRecoveryCoeffF2() const
    {
        return _stressRecoveryCoeff[7].getValue();
    }

    void FITKNasSectionInfoPBAR::setAreaShearFactorK1(const double & value)
    {
        _areaShearFactor[0].setValue(value);
    }

    double FITKNasSectionInfoPBAR::getAreaShearFactorK1() const
    {
        return _areaShearFactor[0].getValue();
    }

    void FITKNasSectionInfoPBAR::setAreaShearFactorK2(const double & value)
    {
        _areaShearFactor[1].setValue(value);
    }

    double FITKNasSectionInfoPBAR::getAreaShearFactorK2() const
    {
        return _areaShearFactor[1].getValue();
    }

    const Core::FITKAbstractParamValueDouble& FITKNasSectionInfoPBAR::getParam(const QString & param,bool & res)
    {
        res = true;
        if (param == "Area")
            return _area;
        else if (param == "InertiaAreaMomentsI1")
            return _inertiaAreaMomentsI1;
        else if (param == "InertiaAreaMomentsI2")
            return _inertiaAreaMomentsI2;
        else if (param == "InertiaAreaMomentsI12")
            return _inertiaAreaMomentsI12;
        else if (param == "TorsionalConstant")
            return _torsionalConstant;
        else if (param == "NonstructuralMass")
            return _nonstructuralMass;
        else if (param == "StressRecoveryCoeffC1")
            return _stressRecoveryCoeff[0];
        else if (param == "StressRecoveryCoeffC2")
            return _stressRecoveryCoeff[1];
        else if (param == "StressRecoveryCoeffD1")
            return _stressRecoveryCoeff[2];
        else if (param == "StressRecoveryCoeffD2")
            return _stressRecoveryCoeff[3];
        else if (param == "StressRecoveryCoeffE1")
            return _stressRecoveryCoeff[4];
        else if (param == "StressRecoveryCoeffE2")
            return _stressRecoveryCoeff[5];
        else if (param == "StressRecoveryCoeffF1")
            return _stressRecoveryCoeff[6];
        else if (param == "StressRecoveryCoeffF2")
            return _stressRecoveryCoeff[7];
        else if (param == "AreaShearFactorK1")
            return _areaShearFactor[0];
        else if (param == "AreaShearFactorK2")
            return _areaShearFactor[1];
        else
            res = false;
        return Core::FITKAbstractParamValueDouble();

    }

}


